Next | Prev | Up | Top | Contents | Index

Overview of the dsreq Driver

IRIX includes a generic SCSI device driver, the dsreq driver, through which a user-level program can issue SCSI commands to SCSI devices. This is a character device driver that supports only open(), close() and ioctl() operations (see "Kinds of Kernel-Level Drivers", and also the open(2), close(2) and ioctl(2) reference pages).

The formal documentation of the dsreq driver is found in the ds(7) reference page. In order to invoke its services, you prepare a dsreq data structure describing the operation and pass it to the device driver using an ioctl() call. The device driver issues the SCSI command you specify, and sleeps until it has completed. Then it returns the status in the dsreq structure.

You can request operations for input and output as well as issuing control and diagnostic commands. The dsreq structure for input and output operations specifies a buffer in memory for data transfer. The dsreq driver handles the task of locking the buffer into memory (if necessary) and managing a DMA transfer of data.

The programming interface supported by the generic SCSI driver is quite primitive. A library of higher-level functions makes it easier to use. This library is formally documented in the dslib(3) reference page, and is described under "Using dslib Functions".



Next | Prev | Up | Top | Contents | Index